﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>提现管理</title>
    <link href="~/plugins/layui/css/layui.css" rel="stylesheet" />
</head>
<body style="margin-left:10px;margin-top:10px;">
    <div id="ss" class="layui-form-item">
        <div class="layui-inline">
            <div class="layui-input-inline" style="width: 30px;">
                <i class="layui-icon" style="font-size: 30px; color: #1E9FFF;">&#xe615;</i>
            </div>
            <div class="layui-input-inline layui-hide" style="width: 150px;">
                <select name="pay_type">
                    <option value="0" selected="">= 全部支付类型 =</option>
                    @foreach (string name in Enum.GetNames(typeof(LJShengHelper.PayType)))
                    {
                        LJShengHelper.PayType type = (LJShengHelper.PayType)Enum.Parse(typeof(LJShengHelper.PayType), name, true);
                        <option value="@((int)type)">@name</option>
                    }
                </select>
                <select name="pay_status">
                    <option value="0" selected="">= 全部状态 =</option>
                    @foreach (string name in Enum.GetNames(typeof(LJShengHelper.PayStatus)))
                    {
                        LJShengHelper.PayStatus type = (LJShengHelper.PayStatus)Enum.Parse(typeof(LJShengHelper.PayStatus), name, true);
                        if (@name == "支付成功")
                        {
                            <option value="@((int)type)" selected="selected">@name</option>
                        }
                        else
                        {
                            <option value="@((int)type)">@name</option>
                        }
                    }
                </select>
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" value="@Request.QueryString["usergid"]" name="usergid" class="layui-hide" />
                <input type="text" value="@Request.QueryString["buygid"]" name="buygid" class="layui-hide" />
                <input type="text" placeholder="会员手机号" name="account" class="layui-input" />
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="商家/套餐名称" name="name" class="layui-input" />
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="系统/网银订单号" name="order_no" class="layui-input" />
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="开始时间" name="stime" autocomplete="off" lay-verify="date" class="layui-input" onclick="layui.laydate({ elem: this, istime: true, festival: true, format: 'YYYY-MM-DD hh:mm:ss' })" />
            </div>
            <div class="layui-form-mid">-</div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="结束时间" name="etime" autocomplete="off" lay-verify="date" class="layui-input" onclick="layui.laydate({ elem: this, istime: true, festival: true, format: 'YYYY-MM-DD hh:mm:ss' })" />
            </div>
            <div class="layui-input-inline">
                <button onclick="getlist(1);" class="layui-btn">给偶搜</button>
            </div>
        </div>
    </div>
    <div class="layui-form">
        <table class="layui-table">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>系统订单号</th>
                    <th>经销商/套餐名称</th>
                    <th>下单和验证时间/卡密</th>
                    <th>原价</th>
                    <th>支付</th>
                    <th>享受折扣</th>
                    <th>单价</th>
                </tr>
            </thead>
            <tbody id="tbody">
                <script id="tpl" type="text/html">
                    {{each list as item index}}
                    <tr style="background-color:{{index%2 ==0 ?"#FFFFF0":""}};">
                        <td rowspan="2">{{index+1}}</td>
                        <td>{{item.order_no}}</td>
                        <td>{{item.account}}</td>
                        <td>{{item.addtime}} (验证时间={{item.pay_time}})</td>
                        <td>{{item.amount}}</td>
                        <td>{{item.rmb}}(卡密数量={{item.num}})</td>
                        <td>{{item.ptf}} 折</td>
                        <td><span style="color:hotpink;">{{item.user_cash}}</span></td>
                    </tr>
                    <tr style="background-color:{{index%2 ==0 ?"#FFFFF0":""}};">
                        <td>{{item.remarks}}</td>
                        <td>{{item.name}}({{item.tianshu}}天)</td>
                        <td>{{item.coupon_number}}</td>
                        <td colspan="2">{{item.zhekou}}</td>
                        <td colspan="2"><button class="layui-btn layui-btn-mini" onclick="Showiframe('{{item.account}}','/home/kmpost?kami={{item.coupon_number}}');">提交到卡密平台</button></td>
                    </tr>
                    {{/each}}
                </script>
            </tbody>
        </table>
    </div>
    <div id="page"></div>
    共 <label id="pages">0</label> 页, <label id="count">0</label> 条数据 <em style="color:red;">当前查询条件总收入=<label id="parame1"></label></em> <a href="javascript: daochu();" class="layui-btn layui-hide">导出当前查询的数据</a>
    <label id="Controllers" class="layui-hide">order</label>
    <script src="~/js/jquery.js"></script>
    <script src="~/plugins/layui/layui.js"></script>
    <script src="~/js/template-web.js"></script>
    <script src="~/js/list.js"></script>
    <script src="~/js/daochu.js"></script>
</body>
</html>